import request from './request.js'

const companyAPI = {
  async getCompanyList() {
    return await request({
      url: '/employer/getList',
      method: 'get',
    })
  },
}
const empAPI = {
  async EmpLogin(params) {
    return await request({
      url: '/employer/login',
      method: 'post',
      data: params,
    })
  },
  async EmpRegister(params) {
    return await request({
      url: '/employer/register',
      method: 'post',
      data: params,
    })
  },
  async EmpAndCompany(params) {
    return await request({
      url: '/employer/searchAll',
      method: 'get',
      params: {
        id: params,
      },
    })
  },
  async EmpModify(params) {
    return await request({
      url: '/employer/modifyEmployer',
      method: 'post',
      data: params,
    })
  },
  /**
   * 修改密码
   */
  async changePassword(params) {
    return await request({
      url: '/employer/changePassword',
      method: 'post',
      data: params,
    })
  },

  async getAddJobs(params) {
    return await request({
      url: '/job/employerAddjob',
      method: 'get',
      params: {
        bossId: params,
      },
    })
  },

  async addJob(params) {
    return await request({
      url: '/job/addJob',
      method: 'post',
      data: params,
    })
  },

  async deleteJob(params) {
    return await request({
      url: '/job/delete',
      method: 'post',
      data: params,
    })
  },

  async modifyJob(params) {
    return await request({
      url: '/job/modifyJob',
      method: 'post',
      data: params,
    })
  },

  async getEmployeeList(params) {
    return await request({
      url: '/employee/getList',
      method: 'get',
      params: {
        page: params,
      },
    })
  },
}
export { companyAPI, empAPI }
